<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
    <title>注册 | 天眼电影</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/frontcss/saved_resource.css">
    <script src="//s0.meituan.net/bs/jsm/?f&#x3D;fe-sso-fs:build/page/vendor/jquery-1.11.3.min.js"></script>
    <script type="text/javascript">

        function refresh() {
            document.getElementById("signup-captcha-mobile-img").src = '${pageContext.request.contextPath }/enimg.jsp?' + Math.random();
        }

        function setStatus(val) {
            if (val == "") {
                document.getElementById("small").style.background = "silver";
                document.getElementById("middle").style.background = "silver"
                document.getElementById("big").style.background = "silver";
            } else if (val.length <= 4) {
                document.getElementById("small").style.background = "yellow";
                document.getElementById("middle").style.background = "silver"
                document.getElementById("big").style.background = "silver";
            } else if (val.length > 4 && val.length <= 8) {
                document.getElementById("small").style.background = "yellow";
                document.getElementById("middle").style.background = "yellow";
                document.getElementById("big").style.background = "silver";
            } else {
                document.getElementById("small").style.background = "blue";
                document.getElementById("middle").style.background = "blue";
                document.getElementById("big").style.background = "blue";
            }
        }

        if ("${msg}" != null && "${msg}".length > 0) {
            alert("${msg}");
        }

        function check() {
            if ($("#mobile").val() == "") {
                alert("请输入手机号码");
                $("#mobile").focus();
                return false;
            }
            if ($("#randCode").val() == "") {
                alert("请输入验证码");
                $("#randCode").focus();
                return false;
            }
            if ($("#password").val() == "") {
                alert("请输入密码");
                $("#password").focus();
                return false;
            }
            if ($("#password").val() != $("#password1").val()) {
                alert("密码与确认密码不符");
                $("#password1").focus();
                return false;
            }
            return true;
        }
    </script>
</head>
<body class="pg-unitive-signup theme--maoyan">
<header class="header--mini">
    <div class="wrapper cf">
        <img src="${pageContext.request.contextPath}/frontimg/fox.jpg" height="80px"/>
    </div>
</header>
<div class="content">
    <div class="J-unitive-signup-form">
        <div class="sheet" style="display:block">
            <form action="${pageContext.request.contextPath}/front/index/userAdd" method="POST"
                  onsubmit="return check();">
                <div class="form-field form-field--mobile">
                    <label>手机号</label>
                    <input type="text" name="mobile" id="mobile" class="f-text J-mobile">
                    <span class="J-unitive-tip unitive-tip">登录账号，唯一</span>
                </div>
                <div class="form-field form-field--vbtn">
                    <label>图片验证码</label>
                    <div class="J-captcha captcha-wrapper" style="display:block" hidden="false">
                        <input type="text" class="f-text J-captcha" name="randCode" id="randCode" autocomplete="off">
                        <img id="signup-captcha-mobile-img" height="34px" width="60px"
                             class="signup-captcha-img J-captcha-refresh"
                             src="${pageContext.request.contextPath}/enimg.jsp">
                        <a tabindex="-1" class="J-captcha-refresh captcha-refresh inline-link" href="javascript:void(0)"
                           onclick="refresh();">看不清楚？换一张</a>
                        <span class="J-captcha-tip inline-tip"></span>
                    </div>
                    <div class="verify-wrapper" style="display:none" hidden="true">
                        <input type="button" class="btn-normal btn-mini verify-btn J-verify-btn" value="免费获取短信动态码">
                        <span class="f1 verify-tip" id="J-verify-tip"></span>
                    </div>
                </div>
                <div class="form-field form-field--sms" style="display:none" hidden="true">
                    <label>短信动态码</label>
                    <input type="text" name="verifycode" class="f-text J-sms">
                </div>
                <div class="form-field form-field--pwd">
                    <div class="pw-strength">
                        <div class="pw-strength__bar" id="J-pw-strength__bar"></div>
                        <div class="pw-strength__letter">
                            <span class="pw-strength__label" id="small">弱</span>
                            <span class="pw-strength__label" id="middle">中</span>
                            <span class="pw-strength__label pw-strength__label--noborder" id="big">强</span>
                        </div>
                    </div>
                    <label>创建密码</label>
                    <input type="password" name="password" id="password" class="f-text J-pwd"
                           onkeyup="setStatus(this.value);">
                </div>
                <div class="form-field form-field--pwd2">
                    <label>确认密码</label>
                    <input type="password" name="password1" id="password1" class="f-text J-pwd2">
                </div>
                <div class="slider-verify-wrapper" style="display:none">
                    <div class="slider-verify-pop-bg"></div>
                    <div id="slider-verify"></div>
                </div>
                <div class="form-field">
                    <input type="submit" name="commit" class="btn" value="同意以下协议并注册">
                    <a href="javascript:void(0);" target="_blank"></a>
                </div>
                <input type="hidden" name="fingerprint" class="J-fingerprint" value="0-2-0-">
            </form>
        </div>

    </div>


    <div class="term">
        <a class="f1" href="javascript:void(0);">《天眼用户服务协议》</a>
        <a class="f1" href="javascript:void(0);">《天眼隐私政策》</a>
    </div>
</div>

<footer class="footer--mini">
    <p class="copyright">
        ©<a class="f1" href="https://www.sms98.cn/">sms98.cn</a>&nbsp;
        <a class="f1" target="_blank" href="http://www.sms98.cn/">赣ICP备15001233号-1</a>&nbsp;
        <span class="f1">京公网安备15001233号-1</span>
    </p>
</footer>

</body>
</html>
